using Castle.MonoRail.Framework;

namespace AspView.com.Components
{
	public class Menu : ViewComponent
	{
		public override void Render()
		{
			PropertyBag["menuItem"] = MenuItems.Home;

			if (RailsContext.CurrentController.Name == "home" &&
				RailsContext.CurrentController.Action == "download")
				PropertyBag["menuItem"] = MenuItems.Download;

			if (RailsContext.CurrentController.Name == "documentation")
				PropertyBag["menuItem"] = MenuItems.Documentation;

			RenderView("Default");
		}
	}
	public enum MenuItems
	{
		Home,
		Download,
		Documentation
	}
}
